<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script src="./Muplugin.js"></script>
</head>
<body>
  <div id="root"></div>
  <script>
    // 用法：安装插件或自己编写插件
    // 需要在调用 new Vue() 之前被调用
    // 插件只会被安装一次

    var Profile = Vue.extend({
      template: '<p>{{firstName}} {{lastName}} aka {{alias}} {{obj.a}}</p>',
      data: function () {
        return {
          firstName: 'walter',
          lastName: 'white',
          alias: 'heisenberg',
          obj: {
            a: 1
          }
        }
      }
    })

    Vue.use(MyPlugin);

    new Profile().$mount('#root');
</script>
</body>
</html>